package com.wwu.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wwu.common.constant.CommConst;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 系统菜单实体
 * @author 一蓑烟雨
 * @date 2021-10-26
 * @version 1.0.0
 */
@Data
@Accessors(chain = true)
@TableName("sys_menu")
@ApiModel(value="SysMenu:系统菜单实体", description="系统菜单实体")
public class SysMenu implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "菜单编码")
    @TableId(value = "menu_id", type = IdType.ASSIGN_ID)
    private String menuId;

    @ApiModelProperty(value = "菜单名称")
    @TableField("menu_name")
    private String menuName;

    @ApiModelProperty(value = "菜单描述")
    @TableField("menu_desc")
    private String menuDesc;

    @ApiModelProperty(value = "菜单类型(0:模块;1:目录;2:菜单;3:按钮)")
    @TableField("menu_type")
    private Integer menuType;

    @ApiModelProperty(value = "菜单图标")
    @TableField("menu_icon")
    private String menuIcon;

    @ApiModelProperty(value = "菜单URL地址")
    @TableField("menu_url")
    private String menuUrl;

    @ApiModelProperty(value = "菜单权限")
    @TableField("menu_auth")
    private String menuAuth;

    @ApiModelProperty(value = "打开方式(_self:内嵌;_blank:外链;)")
    @TableField("menu_target")
    private String menuTarget;

    @ApiModelProperty(value = "父菜单编码")
    @TableField("parent_menu_id")
    private String parentMenuId;

    @ApiModelProperty(value = "菜单状态(0:启用；1:作废)")
    @TableField("menu_status")
    private Integer menuStatus;

    @ApiModelProperty(value = "排序码")
    @TableField("menu_sort")
    private Integer menuSort;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "拼音码")
    @TableField("py")
    private String py;

    @ApiModelProperty(value = "五笔码")
    @TableField("wb")
    private String wb;

    @ApiModelProperty(value = "创建人")
    @TableField(value = "creator",fill = FieldFill.INSERT)
    private String creator;

    @ApiModelProperty(value = "创建时间")
    /** 格式化后台和前端显示样式 */
    @DateTimeFormat(pattern = CommConst.DATE_TIME)
    @JsonFormat(pattern = CommConst.DATE_TIME,timezone = CommConst.TIME_ZONE)
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改人")
    @TableField(value = "modifier",fill = FieldFill.INSERT_UPDATE)
    private String modifier;

    @ApiModelProperty(value = "修改时间")
    /** 格式化后台和前端显示样式 */
    @DateTimeFormat(pattern = CommConst.DATE_TIME)
    @JsonFormat(pattern = CommConst.DATE_TIME,timezone = CommConst.TIME_ZONE)
    @TableField(value = "modify_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime modifyTime;
}
